//
//  LinearProgressView.swift
//  loveHHEveryDay
//
//  Created by yw on 2025/4/7.
//

import SwiftUI

struct LinearProgressView<Shape: SwiftUI.Shape>: View {
    var value: Double
    var shape: Shape

    var body: some View {
        shape.fill(.gray.opacity(0.3))
                .overlay(alignment: .leading) {
                    GeometryReader { proxy in
                        shape.fill(.tint)
                            .frame(width: proxy.size.width * value)
                    }
                }
                .clipShape(shape)
    }
}

